package com.pan.admin.generator.entity;

import com.pan.admin.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Objects;

/**
 *  API生成配置
 *
 *  @author Pan
 */
@Data
public class ApiGenConfigPO extends BaseEntity {

    /** 主键id */
    private Long id;
    /** 生成类型 */
    private String genType;
    /** 生成名称 */
    private String configName;
    /** 生成文本 */
    private String configText;
    /** 哈希值 */
    private String hashCode;

    @Override
    public final boolean equals(Object object) {
        if (this == object) return true;
        if (!(object instanceof ApiGenConfigPO that)) return false;

        return Objects.equals(genType, that.genType) && Objects.equals(configText, that.configText);
    }

    @Override
    public int hashCode() {
        int result = Objects.hashCode(genType);
        result = 31 * result + Objects.hashCode(configText);
        return result;
    }
}
